//
// Created by ✎﹏ℳ๓独赏 ☆独醉 on 2023/4/13.
//
#include <stdio.h>
#include <math.h>
int main(){
    int min,max,temp,i,j;
    scanf("%d%d",&min,&max);
    if(min>max){
        temp = max;
        max = min;
        min = temp;
    }
    for(temp = min;temp<=max;temp++){
        for(i=2;i<= pow(temp,0.5);i++){
            j=0;
            if(temp%i==0){
                j=1;
                break;
            }
        }
        if(j==0)printf("%d\t",temp);

    }
    return 0;
}